<?php
    session_start();
    if(!isset($_SESSION['username'])) {
        die("<a href='/'>Click here to log in first.</a>");
    }
    else {
        $cur_user = $_SESSION['username'];
    }
?>